package com.gopay.common.domain.bank.route.po.pay;

import com.gopay.common.domain.BaseEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * 付款路由-商户规则和银行关联关系
 * @author xj.x@hnair.com
 * @date 2018-04-16 15:58
 **/
@Entity
@Table(name = "pay_spec_route_rule_bank_rel")
public class PaySpecRouteRuleBankRel extends BaseEntity {

    /**
     * 主键
     */
    private Integer id;
    /**
     * 规则ID
     */
    private Integer ruleId;
    /**
     * 银行代码
     */
    private String bankCode;
    /**
     * 收款银行名称
     */
    private String bankName;
    /**
     * 删除标识
     */
    private String delFlag;
    /**
     * 创建时间
     */
    private Date createdTs;
    /**
     * 最后更新时间
     */
    private Date updatedTs;

    @Id
    @SequenceGenerator(name = "paySpecRuleBankRelSeq", sequenceName = "PAY_SPEC_RULE_BANK_REL_SEQ" ,allocationSize=1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "paySpecRuleBankRelSeq")
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "RULE_ID")
    public Integer getRuleId() {
        return ruleId;
    }

    public void setRuleId(Integer ruleId) {
        this.ruleId = ruleId;
    }

    @Column(name = "BANK_CODE")
    public String getBankCode() {
        return bankCode;
    }

    public void setBankCode(String bankCode) {
        this.bankCode = bankCode;
    }

    @Column(name = "BANK_NAME")
    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    @Column(name = "DEL_FLAG")
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Column(name = "CREATED_TS", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Column(name = "UPDATED_TS", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getUpdatedTs() {
        return updatedTs;
    }

    public void setUpdatedTs(Date updatedTs) {
        this.updatedTs = updatedTs;
    }
}
